package io.sage.modules.exam.entity;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class PaperDesignDetailExample {
    /**
     * paper_design_detail
     */
    protected String orderByClause;

    /**
     * paper_design_detail
     */
    protected boolean distinct;

    /**
     * paper_design_detail
     */
    protected List<Criteria> oredCriteria;

    public PaperDesignDetailExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * paper_design_detail 2018-07-06
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdIsNull() {
            addCriterion("paper_design_id is null");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdIsNotNull() {
            addCriterion("paper_design_id is not null");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdEqualTo(Integer value) {
            addCriterion("paper_design_id =", value, "paperDesignId");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdNotEqualTo(Integer value) {
            addCriterion("paper_design_id <>", value, "paperDesignId");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdGreaterThan(Integer value) {
            addCriterion("paper_design_id >", value, "paperDesignId");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("paper_design_id >=", value, "paperDesignId");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdLessThan(Integer value) {
            addCriterion("paper_design_id <", value, "paperDesignId");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdLessThanOrEqualTo(Integer value) {
            addCriterion("paper_design_id <=", value, "paperDesignId");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdIn(List<Integer> values) {
            addCriterion("paper_design_id in", values, "paperDesignId");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdNotIn(List<Integer> values) {
            addCriterion("paper_design_id not in", values, "paperDesignId");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdBetween(Integer value1, Integer value2) {
            addCriterion("paper_design_id between", value1, value2, "paperDesignId");
            return (Criteria) this;
        }

        public Criteria andPaperDesignIdNotBetween(Integer value1, Integer value2) {
            addCriterion("paper_design_id not between", value1, value2, "paperDesignId");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdIsNull() {
            addCriterion("question_type_id is null");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdIsNotNull() {
            addCriterion("question_type_id is not null");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdEqualTo(Integer value) {
            addCriterion("question_type_id =", value, "questionTypeId");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdNotEqualTo(Integer value) {
            addCriterion("question_type_id <>", value, "questionTypeId");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdGreaterThan(Integer value) {
            addCriterion("question_type_id >", value, "questionTypeId");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("question_type_id >=", value, "questionTypeId");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdLessThan(Integer value) {
            addCriterion("question_type_id <", value, "questionTypeId");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdLessThanOrEqualTo(Integer value) {
            addCriterion("question_type_id <=", value, "questionTypeId");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdIn(List<Integer> values) {
            addCriterion("question_type_id in", values, "questionTypeId");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdNotIn(List<Integer> values) {
            addCriterion("question_type_id not in", values, "questionTypeId");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdBetween(Integer value1, Integer value2) {
            addCriterion("question_type_id between", value1, value2, "questionTypeId");
            return (Criteria) this;
        }

        public Criteria andQuestionTypeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("question_type_id not between", value1, value2, "questionTypeId");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeIsNull() {
            addCriterion("question_grade is null");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeIsNotNull() {
            addCriterion("question_grade is not null");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeEqualTo(Integer value) {
            addCriterion("question_grade =", value, "questionGrade");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeNotEqualTo(Integer value) {
            addCriterion("question_grade <>", value, "questionGrade");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeGreaterThan(Integer value) {
            addCriterion("question_grade >", value, "questionGrade");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeGreaterThanOrEqualTo(Integer value) {
            addCriterion("question_grade >=", value, "questionGrade");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeLessThan(Integer value) {
            addCriterion("question_grade <", value, "questionGrade");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeLessThanOrEqualTo(Integer value) {
            addCriterion("question_grade <=", value, "questionGrade");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeIn(List<Integer> values) {
            addCriterion("question_grade in", values, "questionGrade");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeNotIn(List<Integer> values) {
            addCriterion("question_grade not in", values, "questionGrade");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeBetween(Integer value1, Integer value2) {
            addCriterion("question_grade between", value1, value2, "questionGrade");
            return (Criteria) this;
        }

        public Criteria andQuestionGradeNotBetween(Integer value1, Integer value2) {
            addCriterion("question_grade not between", value1, value2, "questionGrade");
            return (Criteria) this;
        }

        public Criteria andUseCountIsNull() {
            addCriterion("use_count is null");
            return (Criteria) this;
        }

        public Criteria andUseCountIsNotNull() {
            addCriterion("use_count is not null");
            return (Criteria) this;
        }

        public Criteria andUseCountEqualTo(Integer value) {
            addCriterion("use_count =", value, "useCount");
            return (Criteria) this;
        }

        public Criteria andUseCountNotEqualTo(Integer value) {
            addCriterion("use_count <>", value, "useCount");
            return (Criteria) this;
        }

        public Criteria andUseCountGreaterThan(Integer value) {
            addCriterion("use_count >", value, "useCount");
            return (Criteria) this;
        }

        public Criteria andUseCountGreaterThanOrEqualTo(Integer value) {
            addCriterion("use_count >=", value, "useCount");
            return (Criteria) this;
        }

        public Criteria andUseCountLessThan(Integer value) {
            addCriterion("use_count <", value, "useCount");
            return (Criteria) this;
        }

        public Criteria andUseCountLessThanOrEqualTo(Integer value) {
            addCriterion("use_count <=", value, "useCount");
            return (Criteria) this;
        }

        public Criteria andUseCountIn(List<Integer> values) {
            addCriterion("use_count in", values, "useCount");
            return (Criteria) this;
        }

        public Criteria andUseCountNotIn(List<Integer> values) {
            addCriterion("use_count not in", values, "useCount");
            return (Criteria) this;
        }

        public Criteria andUseCountBetween(Integer value1, Integer value2) {
            addCriterion("use_count between", value1, value2, "useCount");
            return (Criteria) this;
        }

        public Criteria andUseCountNotBetween(Integer value1, Integer value2) {
            addCriterion("use_count not between", value1, value2, "useCount");
            return (Criteria) this;
        }

        public Criteria andSingleScoreIsNull() {
            addCriterion("single_score is null");
            return (Criteria) this;
        }

        public Criteria andSingleScoreIsNotNull() {
            addCriterion("single_score is not null");
            return (Criteria) this;
        }

        public Criteria andSingleScoreEqualTo(BigDecimal value) {
            addCriterion("single_score =", value, "singleScore");
            return (Criteria) this;
        }

        public Criteria andSingleScoreNotEqualTo(BigDecimal value) {
            addCriterion("single_score <>", value, "singleScore");
            return (Criteria) this;
        }

        public Criteria andSingleScoreGreaterThan(BigDecimal value) {
            addCriterion("single_score >", value, "singleScore");
            return (Criteria) this;
        }

        public Criteria andSingleScoreGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("single_score >=", value, "singleScore");
            return (Criteria) this;
        }

        public Criteria andSingleScoreLessThan(BigDecimal value) {
            addCriterion("single_score <", value, "singleScore");
            return (Criteria) this;
        }

        public Criteria andSingleScoreLessThanOrEqualTo(BigDecimal value) {
            addCriterion("single_score <=", value, "singleScore");
            return (Criteria) this;
        }

        public Criteria andSingleScoreIn(List<BigDecimal> values) {
            addCriterion("single_score in", values, "singleScore");
            return (Criteria) this;
        }

        public Criteria andSingleScoreNotIn(List<BigDecimal> values) {
            addCriterion("single_score not in", values, "singleScore");
            return (Criteria) this;
        }

        public Criteria andSingleScoreBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("single_score between", value1, value2, "singleScore");
            return (Criteria) this;
        }

        public Criteria andSingleScoreNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("single_score not between", value1, value2, "singleScore");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreIsNull() {
            addCriterion("single_total_score is null");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreIsNotNull() {
            addCriterion("single_total_score is not null");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreEqualTo(BigDecimal value) {
            addCriterion("single_total_score =", value, "singleTotalScore");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreNotEqualTo(BigDecimal value) {
            addCriterion("single_total_score <>", value, "singleTotalScore");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreGreaterThan(BigDecimal value) {
            addCriterion("single_total_score >", value, "singleTotalScore");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("single_total_score >=", value, "singleTotalScore");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreLessThan(BigDecimal value) {
            addCriterion("single_total_score <", value, "singleTotalScore");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreLessThanOrEqualTo(BigDecimal value) {
            addCriterion("single_total_score <=", value, "singleTotalScore");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreIn(List<BigDecimal> values) {
            addCriterion("single_total_score in", values, "singleTotalScore");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreNotIn(List<BigDecimal> values) {
            addCriterion("single_total_score not in", values, "singleTotalScore");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("single_total_score between", value1, value2, "singleTotalScore");
            return (Criteria) this;
        }

        public Criteria andSingleTotalScoreNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("single_total_score not between", value1, value2, "singleTotalScore");
            return (Criteria) this;
        }
    }

    /**
     * paper_design_detail
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    /**
     * paper_design_detail 2018-07-06
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}